﻿
Public Class Main

    Private Sub Main_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Text = My.Application.Info.Title & " v" & My.Application.Info.Version.ToString()

        'Dim nfi = New Globalization.CultureInfo("fr-FR", True).NumberFormat
        'nfi.CurrencyGroupSeparator = " "

        'MsgBox(String.Format("{0:C}", 12345.5))
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Dim mapGen As New ERGBMapGenerator()

        'Debug.Print("res=[" & RealRandom.Rand(0, 10) & "]")

        'Static Generator As System.Random = New System.Random()
        'Threading.ThreadPool.QueueUserWorkItem(
        '    Sub()
        '        While True
        '            Dim value = Generator.Next(0, 10)
        '            If value = 10 Then
        '                MsgBox("10 !")
        '                Exit While
        '            End If
        '            Debug.Print("value => " & value.ToString())
        '        End While
        '    End Sub
        ')

        mapGen.GenerateMap(
            Sub(image As Bitmap)
                PictureBox1.Image = Bitmap.FromHbitmap(image.GetHbitmap)
            End Sub
        )
    End Sub
End Class
